<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Kecamatan extends CI_Controller {

	function __construct()
	{
		parent::__construct();
	}

	function get_ajax_kelurahan(){
		$this->load->model('ipkd_model');
		
		$kelurahan = $this->ipkd_model->get_klr_by_kcm($this->input->post('IDKECAMATAN'));
		$options = '<option value="0" >-- Pilih Kelurahan --</option>';
					
			foreach($kelurahan->result() as $row){
				$options .= '<option value="'.$row->NAMA_KELURAHAN.'" >'.$row->NAMA_KELURAHAN.'</option>';
			}
		
		echo $options;
	}
	
}

/* End of file welcome.php */
/* Location: ./application/controllers/welcome.php */